﻿using System;
using System.ComponentModel;
using System.Text.Json.Serialization;

namespace DimensionsHelper.Common.Contracts.Excel;

[Flags]
[JsonConverter(typeof(JsonStringEnumConverter<BorderPosition>))]
public enum BorderPosition
{
    /// <summary>
    ///     不添加边框
    /// </summary>
    [Description("不添加")]
    None = 0,

    /// <summary>
    ///     添加左边框
    /// </summary>
    // [Description("左")]
    Left = 0x2,

    /// <summary>
    ///     添加右边框
    /// </summary>
    // [Description("右")]
    Right = 0x4,

    /// <summary>
    ///     添加上边框
    /// </summary>
    // [Description("上")]
    Top = 0x8,

    /// <summary>
    ///     添加下边框
    /// </summary>
    // [Description("下")]
    Bottom = 0x10,

    /// <summary>
    ///     水平边框，不包含外边框。
    /// </summary>
    [Description("水平")]
    Horizontal = Top | Bottom,

    /// <summary>
    ///     垂直边框，不包含外边框。
    /// </summary>
    [Description("垂直")]
    Vertical = Left | Right,

    /// <summary>
    ///     添加四周的边框。
    /// </summary>
    [Description("四周")]
    Around = 0x20
}